﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Data;


namespace StatisticLeague
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {

        private DBfacade facade = new DBfacade();

        public Insert_window insert_win = new Insert_window();
        
        public MainWindow()
        {
            InitializeComponent();
            
  
        }

        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            DataTable dt;
            String Score_query = "Select * From [Score]";
            dt = facade.DBview(Score_query);
            DG_Scores.ItemsSource = dt.DefaultView;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            insert_win.Show();
        }


        
     
        
        
        
        
    }
}
